<?php
if (!isset($alias)) {
	$alias = 'su_kien';
}
// Load Data
App::import('Model', 'news.News');
$articles = ClassRegistry::init('News')->getNewestNews($alias, array('alias', 'image', 'description'), 3);

// Load Category Info
App::import('Model', 'news.NewsCategory');
$category_info = ClassRegistry::init('NewsCategory')->find('first', array(
	'conditions'	=>	array('NewsCategory.alias' => $alias),
	'fields'		=>	array('name')
));
?>

<h2 class="title_square"><?php echo $category_info['NewsCategory']['name'];?>:</h2>
<ul class="list_album">
	<?php foreach($articles as $item):?>
	<li>
		<a href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'view', $item['News']['alias'], $alias));?>">
			<table class="icon_cell">
				<tr>
					<td>
						<img width='72' height='48' src='<?php echo $html->url("/".$configs['News']['thumbnail']['uri'].$html->getThumbnailName($item['News']['image']))?>'/>
					</td>
				</tr>
			</table>
			<?php echo strip_tags($item['News']['description']);?>
		</a>
	</li>
	<?php endforeach;?>
</ul>
<a class="view_more" href="<?php echo $html->url(array('plugin' => 'news', 'controller' => 'news', 'action' => 'listnews', $alias));?>"><?php __("Xem tất cả");?></a>